<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>

<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<fmt:setBundle basename="lang.message" />

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<jsp:include page="Redir.jsp"></jsp:include>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link href="<c:url value='/css/default.css'/>" rel="stylesheet" type="text/css"/>
<title><fmt:message key="general.title" /> - <fmt:message key="login.title" /></title>
<script type="text/javascript" src="js/jquery-1.8.2.min.js"></script>
<script type="text/javascript">
	$(document).ready(function() {
		$('#loginform').submit(function() {
			var valid = true;
			if ( $.trim( $('#userid').val() ) == "" ) {
				alert("Username required!");
				$('#userid').focus();
				valid = false;
			} else if ( $.trim( $('#password').val() ) == "" ) {
				alert("Password required!");
				$('#password').focus();
				valid = false;
			}
			return valid;
		}); 
	});
				
</script>
</head>
<body>
	<%@include file="Header.jsp" %>
		<form action="Login" method="post" name="loginform" id="loginform">
		
<div id="wrapper">	
    <div id="page-wrapper">
		<div id="page">
		<%@include file="Menu.jsp" %>   
			<div id="content">
				<div>
				<h2><fmt:message key="login.title"/></h2>
		<table class="table-form">
			<tr>
				<td>User ID</td>
				<td><input type="text" name="userid" id="userid" size="27" value="" /></td>
			</tr>
			<tr>
				<td>Password</td>
				<td><input type="password" name="password" id="password" class="required" size="27" value="" /></td>
			</tr>
			<c:if test="${not empty error}">
				<tr>
					<td colspan="2" style="color: red;">
						<fmt:message key="${error}" />
					</td>
				</tr>
			</c:if>			
		</table>
		<input type="submit" value="Login" class="button-style"/>
		</div>
</div>
</div>
</div>
</div>
</form>		
	<%@include file="Footer.jsp" %>
</body>
</html>